package com.ys.entity.business;

import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TP_ProductMaterial", catalog="Id")
public class TpProductMaterial extends BaseEntity<TpProductMaterial> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Type", nameJava="type", typeDataBase="tinyint")
	private Integer type;
	@YsField(nameDataBase="ProductCode", nameJava="productCode", typeDataBase="varchar")
	private String productCode;
	@YsField(nameDataBase="MaterialId", nameJava="materialId", typeDataBase="bigint")
	private Long materialId;
	@YsField(nameDataBase="MaterialNameCn", nameJava="materialNameCn", typeDataBase="varchar")
	private String materialNameCn;
	@YsField(nameDataBase="MaterialNameEn", nameJava="materialNameEn", typeDataBase="varchar")
	private String materialNameEn;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TpProductMaterial setId(Long id) {
		this.id = id;
		return this;
	}
	public Integer getType() {
		return type;
	}
	public TpProductMaterial setType(Integer type) {
		this.type = type;
		return this;
	}
	public String getProductCode() {
		return productCode;
	}
	public TpProductMaterial setProductCode(String productCode) {
		this.productCode = productCode;
		return this;
	}
	public Long getMaterialId() {
		return materialId;
	}
	public TpProductMaterial setMaterialId(Long materialId) {
		this.materialId = materialId;
		return this;
	}
	public String getMaterialNameCn() {
		return materialNameCn;
	}
	public TpProductMaterial setMaterialNameCn(String materialNameCn) {
		this.materialNameCn = materialNameCn;
		return this;
	}
	public String getMaterialNameEn() {
		return materialNameEn;
	}
	public TpProductMaterial setMaterialNameEn(String materialNameEn) {
		this.materialNameEn = materialNameEn;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TpProductMaterial setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TpProductMaterial setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TpProductMaterial setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TpProductMaterial tpProductMaterial(
		Integer type,
		String productCode,
		Long materialId,
		String materialNameCn,
		String materialNameEn,
		Integer status
			) {
		TpProductMaterial entity = new TpProductMaterial();
		entity.setType(type);
		entity.setProductCode(productCode);
		entity.setMaterialId(materialId);
		entity.setMaterialNameCn(materialNameCn);
		entity.setMaterialNameEn(materialNameEn);
		entity.setStatus(status);
		return entity;
	}
}